package com.lyx.Exercise;

import java.util.HashSet;

public class Set extends HashSet {

    public static void main(String[] args) {

    }

    public Set Intersection(Set set){
        Set newSet = new Set();
        for (Object ob : this){
            if(set.contains(ob)){
                newSet.add(ob);
            }
        }
        return newSet;

    }
}
